import {request} from '@/utils/product';
import type{TrademarkInfoData,TrademarkData} from './model/productData'

export const getTrademarkList = (page:number,limit:number) => {
    return request.get<any,TrademarkInfoData>(`/admin/product/baseTrademark/${page}/${limit}`)
}

export const addOrUpdateTrademark = (row:TrademarkData) => {
    if(row.id) {
        return request.put<any, null>('/admin/product/baseTrademark/update', row)
      } else {
        return request.post<any, null>('/admin/product/baseTrademark/save', row)
      }
    
}

export const remove = (id: number)=> {
    return request.delete<any, null>(`/admin/product/baseTrademark/remove/${id}`)
  }